import React from 'react';
import { Row, Col, Button } from 'antd';
import Delete from './Delete';

export default ({ temId, dispatch, goBack, handleSave, handleSubmit }) => (
  <Row>
    <Col span={12} style={{ textAlign: 'left' }}>
      {temId && <Delete dispatch={dispatch} temId={temId} />}
    </Col>
    <Col span={12} style={{ textAlign: 'right' }}>
      {goBack && (
        <Button onClick={goBack} style={{ marginRight: 10 }}>
          上一步
        </Button>
      )}

      <Button onClick={handleSave} style={{ marginRight: 10 }}>
        暂存
      </Button>
      <Button type="primary" onClick={handleSubmit}>
        下一步
      </Button>
    </Col>
  </Row>
);
